package expressions.slogo;

import java.util.List;
import parsing.Token;

/**
 * Returns the x-coordinate of the turtle.
 */
@Token(regex = "xcor")
public class Xcor extends TurtleCommand
{

    public Xcor()
    {
        super(0);
    }

    @Override
    protected Double combineResults(List<Double> results, ITurtleContext context)
    {
        return context.getTurtle().getX();
    }

}
